You can install an intercept procedure that is executed immediately before the QuickTime VR Manager function it is intercepting.
You can define a routine to intercept various QuickTime VR Manager functions.
pascal void MyInterceptProc (
QTVRInstance qtvr,
QTVRInterceptPtr qtvrMsg,
SInt32 refCon,
Boolean *cancel);
Your MyInterceptProc procedure is called whenever the QuickTime VR Manager is about to call the function it is intercepting (which is specified by the selector field of the intercept record pointed to by the qtvrMsg parameter). Your procedure can do any processing it deems necessary before returning.
Your intercept procedure should return, in the cancel parameter, a Boolean value that indicates whether your procedure performed the intercepted function ( true ) or not ( false ). The QuickTime VR Manager inspects that value to determine whether it should call the intercepted function after your procedure returns. Your intercept procedure can also call the QTVRCallInterceptedProc function to call the intercepted function. If your procedure does call QTVRCallInterceptedProc , then it should return the value true , unless you want the QuickTime VR Manager to call the intercepted function again.
Use QTVRInstallInterceptProc to install an intercept procedure. See Listing 2-5 and Listing 2-6 for sample intercept procedures.
| Previous | Chapter Contents | Chapter Top | Next |